
<jsp:useBean id="collection" scope="session"
             class="beans.SessionScopeBean"/>
<%@page contentType="text/html" pageEncoding="UTF-8"
        import="beans.SessionScopeBean"%>
<%@ page import="java.util.List" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Show</title>
</head>
<body>
 <form method="post">
<table border="1">
    <thead>
    <tr>
        <th>Last Name</th>
        <th>First Name</th>
        <th>Second Name</th>
    </tr>
    </thead>
    <tbody>
    <%List<SessionScopeBean.Inner> var = collection.getList();%>
    <%for (int i = 0; i < collection.getList().size(); i++) {
    %>

    <tr>
    <td><%= var.get(i).getSurname() %></td>
    <td> <%= var.get(i).getName() %></td>
    <td> <%=var.get(i).getSecondName() %></td>

    <td><a href="/task4/servlet/DeleteServlet?id=<%=var.get(i).getId()%>">Delete </a></td>
    </tr>

    <%} %>
    </tbody>
</table>
     <a href="/task4/jsp/index.jsp">Back</a>
     </form>
</body>
</html>
